package lab.jsp.util;

import java.sql.Connection;
import java.sql.DriverManager;
import static lab.jsp.util.Constants.*;

/**
 *
 * @author Smike
 */
public class ConnectionUtil {
 
    public static Connection getConnection() {
        Connection connection;

        try {
            Class.forName("oracle.jdbc.driver.OracleDriver");
//            Locale.setDefault(Locale.ENGLISH);
            connection = DriverManager.getConnection(CONNECTION_STRING, USER_NAME, PASSWORD);
            connection.setAutoCommit(true);
        } catch (Exception ex) {
            throw new RuntimeException(ex);
        }
        return connection;
    }
    
}
